<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/sks/cms/page/share/taglib.jsp" %>
<html>
<head>
<title>员工显示</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="/css/vip.css" type="text/css">
<script language="JavaScript">
<!--
	//到指定的分页页面
function topage(page){
	var form = document.forms[0];
	form.page.value=page;
	form.submit();
}
function queryEmployee() {
	document.forms[0].query.value = 'true';
	document.forms[0].submit();
}
function clearCondition() {
	document.forms[0].username.value = '';
	document.forms[0].query.value = 'false';
	document.forms[0].submit();
}


function firm(name)
{//利用对话框返回的值 （true 或者 false）
	
    if(confirm("确定标志位离职吗"))
    {//如果是true
    	//alert(1);
    	window.location="/cms/privilege/employee/manage.do?method=leave&username='"+name+"'";
     }
    else
    {//
    	//alert(2);
        
     }
}

//-->
</script>
<SCRIPT language=JavaScript src="/js/FoshanRen.js"></SCRIPT>
</head>

<body bgcolor="#FFFFFF" text="#000000" marginwidth="0" marginheight="0">
<html:form action="/cms/privilege/employee/list" method="post">
<html:hidden property="page"/>
<html:hidden property="query" styleId="query"/>
<html:hidden property="method" value="list"/>
  <table width="98%" border="0" cellspacing="1" cellpadding="2" align="center">

    <tr bgcolor="f5f5f5"> 
      <td bgcolor="f5f5f5" colspan="7" align="center"><table width="100%" border="0" cellspacing="1" cellpadding="3">
          <tr> 
            <td width="12%" > <div align="right">用户名：</div></td>
      		<td width="78%"> 
      			<html:text property="username" size="30"/>
      		</td>
          </tr>
        </table>
      </td>
    </tr>
    
    <tr> 
      <td bgcolor="f5f5f5" colspan="7" align="center"><table width="100%" border="0" cellspacing="1" cellpadding="3">
          <tr> 
            <td width="5%"></td>
            <td width="85%">
              <button type="button" onClick="javascript:queryEmployee();">&nbsp;<bean:message key="display.query"/>&nbsp;</button>&nbsp;&nbsp;
              <button type="button" onClick="javascript:clearCondition();">清除查询条件</button>
            </td>
          </tr>
        </table></td>
    </tr>
	<tr>
		<td colspan="11" bgcolor="#ffbe26" align="right"><%@ include
				file="/sks/cms/page/share/fenye.jsp"%></td>
	</tr>
	<tr>
      <td width="5%" nowrap bgcolor="#ffbe26"> <div align="center"><font color="#000000">修改</font></div></td>
      <td width="8%" bgcolor="#ffbe26"> <div align="center"><font color="#000000">用户名</font></div></td>
      <td width="8%" bgcolor="#ffbe26"> <div align="center"><font color="#000000">设置权限</font></div></td>
      <td width="12%" bgcolor="#ffbe26"> <div align="center"><font color="#000000">联系电话</font></div></td>
      <td width="10%" bgcolor="#ffbe26"> <div align="center"><font color="#000000">电子邮件</font></div></td>
      <td width="10%" bgcolor="#ffbe26"> <div align="center"><font color="#000000">照片</font></div></td>
      <td width="9%" bgcolor="#ffbe26"></td>
    </tr>
<!---------------------------LOOP START------------------------------>
<c:forEach items="${pageView.records}" var="entry">
    <tr>
      <td bgcolor="f5f5f5"> <div align="center"><a href="<html:rewrite action="/cms/privilege/employee/manage"/>?method=editEmployeeUI&username=${entry.username}">
	  <img src="/images/edit.gif" width="15" height="16" border="0"></a></div></td>
	  <td bgcolor="f5f5f5"> <div align="center">${entry.username}</div></td>
      <td bgcolor="f5f5f5"> <div align="center"><a href="<html:rewrite action="/cms/privilege/employee/manage"/>?method=privilegeGroupSetUI&username=${entry.username}">设置权限</a></div></td>
      <td bgcolor="f5f5f5"> <div align="center">${entry.phone}</div></td>
      <td bgcolor="f5f5f5"> <div align="center">${entry.email}</div></td>
      <td bgcolor="f5f5f5"> <div align="center"><c:if test="${!empty entry.imagePath}"><img src="${entry.imagePath}" width="80" border="0"></c:if></div></td>
      <td bgcolor="f5f5f5"> <div align="center">
      <c:if test="${entry.visible}">
      <a style="cursor: pointer; text-decoration: underline " onclick="firm('${entry.username}');">标志为离职</a>
      </c:if> <c:if test="${!entry.visible}"><font color=red>已离职</font></c:if>
      </div></td>
	</tr>
</c:forEach>
    <!----------------------LOOP END------------------------------->
    <tr> 
      <td bgcolor="f5f5f5" colspan="11" align="center"><table width="100%" border="0" cellspacing="1" cellpadding="3">
          <tr> 
            <td width="5%"></td>
              <td width="85%">
              <input type="button" class="frm_btn" onClick="javascript:window.location.href='<html:rewrite action="/cms/privilege/employee/manage"/>?method=regEmployeeUI'" value="添加员工"> &nbsp;&nbsp;
            </td>
          </tr>
        </table></td>
    </tr>
  </table>
</html:form>
</body>
</html>